package net.borlis.sample.services.facade.ws.response;

import org.apache.commons.lang.builder.ToStringBuilder;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

/**
 * @author alex@borlis.net on 04.06.2014.
 */
@XmlRootElement
public class VitoWithProvidersResponse extends VitoResponse {

    @XmlElement
    private List<ProviderWithVitoResponse> hotelProviders;

    @XmlElement
    private List<ProviderWithVitoResponse> flightProviders;

    public VitoWithProvidersResponse() {
        super();
    }

    public VitoWithProvidersResponse(Long id, String code, String name, String kid,
                                     CountryResponse country, List<ProviderWithVitoResponse> hotelProviders,
                                     List<ProviderWithVitoResponse> flightProviders, Integer hpNumber, Integer fpNumber) {
        super(id, code, name, kid, hpNumber, fpNumber, country);
        this.hotelProviders = hotelProviders;
        this.flightProviders = flightProviders;
    }

    public List<ProviderWithVitoResponse> getHotelProviders() {
        return hotelProviders;
    }

    public List<ProviderWithVitoResponse> getFlightProviders() {
        return flightProviders;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this).
                append("id", getId()).
                append("code", getCode()).
                append("name", getName()).
                append("kid", getKid()).
                append("hotelProvidersNumber", getHotelProvidersNumber()).
                append("flightProvidersNumber", getFlightProvidersNumber()).
                append("country", getCountry()).
                append("hotelProviders", hotelProviders).
                append("flightProviders", flightProviders).
                toString();
    }

}
